<template>
  <div id="supplier-center">
    <c-title :hide="false" text="供应商管理"></c-title>
    <div class="user">
      <van-swipe :autoplay="4000" indicator-color="#f15353" :width="fun.getPhoneEnv() == 3 ? 375 : clientWidth" v-if="bannerStatus == 1">
        <van-swipe-item v-for="(slide, index) in bannerList" :key="index">
          <a :href="slide.url" style="display: block;">
            <img  class="swipe-img"  :src="slide" />
          </a>
        </van-swipe-item>
      </van-swipe>
      <div class="linear" v-if="bannerList&&bannerList.length!==0&&bannerStatus"></div>
      <div class="linear-1" v-else></div>
      <div :class="bannerList&&bannerList.length!==0&&bannerStatus?'addPosition':'addPosition-1'">
        <div class="user-header">
          <div class="img">
            <img :src="mainInfo.avatar" />
          </div>
          <div>
            <span class="nickname">{{ mainInfo.nickname }}</span>
          </div>
        </div>
        <div class="user-info">
          <ul>
            <li>
              <b>{{ order_count }}</b>
            </li>
            <li><span class="c-959595 fz-24">今日订单（笔）</span></li>
          </ul>
          <ul>
            <li>
              <b>{{ order_amount }}</b>
            </li>
            <li><span class="c-959595 fz-24">今日销售（元）</span></li>
          </ul>
          <ul>
            <li>
              <b>{{ money_total }}</b>
            </li>
            <li>
              <span class="c-959595 fz-24">累计{{ income_name_text }}（元）</span>
            </li>
          </ul>
        </div>
      </div>
    </div>
    <div class="withdraw">
      <ul>
        <li class="withdraw-tips">可{{ this.fun.initWithdrawal() }}金额</li>
        <li class="withdraw-money">{{ $i18n.t("money") }}<i >{{ cost_money }}</i></li>
      </ul>
      <span @click="goToInfo('5')">{{ this.fun.initWithdrawal() }}</span>
    </div>
    <div class="store-box">
      <div class="my-store">
        <span>我的店铺</span>
      </div>
      <div class="manage-list">
        <ul @click="goToInfo('1')">
          <div class="img">
            <i class="iconfont icon-icon_information"></i>
          </div>
          <li><span>信息管理</span></li>
        </ul>
        <ul @click="goToInfo('2')">
          <div class="img">
            <i class="iconfont icon-a-ht_basis_shangpin_huaban1_huaban1"></i>
          </div>
          <li><span>商品管理</span></li>
        </ul>
        <ul @click="goToInfo('3')">
          <div class="img">
            <i class="iconfont icon-kc_mulu"></i>
          </div>
          <li><span>订单管理</span></li>
        </ul>
        <ul @click="goToInfo('4')">
          <div class="img">
            <i class="iconfont icon-tixian3"></i>
          </div>
          <li>
            <span>{{ this.fun.initWithdrawal() }}记录</span>
          </li>
        </ul>
        <ul @click="goToInfo('6')" v-if="insuclShow" style="margin-top: 1.5625rem;">
          <div class="img">
            <i class="iconfont icon-baodan"></i>
          </div>
          <li><span>保单管理</span></li>
        </ul>
      </div>
    </div>
  </div>
</template>
<script>
import supplier_center_controller from "./supplier_center_controller";
export default supplier_center_controller;
</script>
<style lang="scss" rel="stylesheet/scss" scoped>
.swipe-img{
  position: relative;
  width: 100%;
  height: 9.5rem;margin-bottom: 1rem;
}
.linear-1{
  position: absolute;
  width: 100%;
  height: 10.375rem;
  left: 0;
  right: 0;
  top: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--themeBaseColor) 65%, #F5F5F5 100%);
}
.linear{
  position: absolute;
  width: 100%;
  height: 5.125rem;
  left: 0;
  right: 0;
  top: 5.8125rem;
  background: linear-gradient(180deg, rgba(245,245,245,0) 0%, #F5F5F5 100%)
}
::v-deep .van-nav-bar .van-icon{
  font-size: 0.9375rem;
}

::v-deep .van-nav-bar__title {
  font-size: 1.0625rem;
  font-weight: 500;
}

#supplier-center {
  .user {
    color: #fff;
    position: relative;
    // height: 8.5rem;
    .addPosition-1{
      padding: 1.4375rem 0.75rem 0;
    }
    .addPosition {
      position: absolute;
      top:1.4375rem;
      left: 0.75rem;
      right: 0.75rem;
    }

    .user-header {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      padding-left: 0.3125rem;
      // padding: 0.875rem;
      .nickname{
          font-size: 1rem;
          color:#fff;
      }

      .img {
        margin-right: 0.625rem;
        width: 3.4375rem;
        height: 3.4375rem;
        overflow: hidden;
        border-radius: 50%;

        img {
          width: 100%;
        }
      }

      span {
        font-size: 14px;
        display: block;
        line-height: 2.25rem;
      }
    }

    .user-info {
      background: #FFFFFF;
      border-radius: 0.5rem ;
      margin: 1.5625rem auto 0.625rem;
      display: flex;
      .c-959595{
        color: #959595;
      }
      .fz-24{
        font-size: 0.75rem;
      }

      ul {
        margin: 0.625rem 0;
        width: 33.3%;
        line-height: 1.5rem;

        b {
          font-size: 0.9375rem;
          font-weight: normal;
          color: #00001C;
        }
      }

      ul:last-child {
        border-right: none;
      }
    }
  }

  .withdraw {
    background: #fff;
    display: flex;
    padding: 1.0938rem 0.75rem;
    font-size: 14px;
    position: relative;
    margin: 0.625rem 0.75rem;
    border-radius: 0.5rem ;
    .withdraw-tips{
      color: #6E6E79;
      font-size: 0.75rem;
      font-weight: 400;
      height: 0.75rem;
      line-height: 0.75rem;
    }
    .withdraw-money{
      font-size: 0.75rem;
      font-weight: bold;
      margin-top: 0.8125rem;
    }

    ul {
      text-align: left;
      line-height: 1.5rem;

      i {
        font-size: 1.25rem;
        margin-left: 0.1563rem;
        font-weight: bold;
      }
    }

    span {
      display: block;
      position: absolute;
      min-width: 4.25rem;
      height: 2rem;
      line-height: 2rem;
      padding: 0 0.75rem;
      right: 0.75rem;
      top:2.5rem;
      background: var(--themeBaseColor);
      color: #fff;
      border-radius: 1.875rem;
    }
  }

  .store-box {
    margin: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    background: #fff;
    height: 12.1875rem;

    .my-store {
      height: 2.5rem;
      line-height: 2.5rem;
      font-size: 0.9375rem;
      font-weight: bold;
      padding: 0 0.875rem;
      display: flex;
      justify-content: space-between;

      i {
        font-size: 1.25rem;
        color: #c9c9c9;
        line-height: 2.5rem;
      }
    }

    .manage-list {
      margin-top: 1rem;
      margin-bottom: 1rem;
      display: flex;
      flex-wrap: wrap;

      ul {
        width:25%;
        span{
          font-size: 0.75rem;
          color: #00001C;
        }
        .img {
          .iconfont{
            display: inline-block;
            font-size: 23px;
            margin-bottom: 0.7188rem;
          }

        }

        li {
          // line-height: 1.5rem;
          height: 0.75rem;
          line-height: 0.75rem;
        }
      }
    }
  }
}
</style>